import { _decorator, Component, Label, Layout, Node } from 'cc';
const { ccclass, property } = _decorator;

interface GUIBaseOptions {
    name: string;
    clickFn?: (param: any) => any;
}

@ccclass('GUIBase')
export class GUIBase extends Component {
    public nameLabel: Label | null = null;

    public layout: Layout = null;

    public content: Node = null;

    options: GUIBaseOptions = { name: '' };

    /**
     * 更新参数
     * @param {*} args
     * @memberof UIBase
     */
    public updateOptions(args: GUIBaseOptions) {
        this.options = args;
    }

    protected onLoad(): void {
        this.layout = this.getComponent(Layout);
    }
    
}
